﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="AddFlight.aspx.cs" Inherits="Admin_AddFlight" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table border="1" bordercolor="#99cccc" 
        style="WIDTH: 614px; HEIGHT: 52px; TEXT-ALIGN: center">
        <tr>
            <td style="WIDTH: 608px; HEIGHT: 104px; TEXT-ALIGN: center">
                <table style="WIDTH: 465px">
                <tr>
            <td colspan="3" style="width: 608px; height: 26px; text-align: center" 
                bgcolor="#5C8BA7">
                <strong><span style="font-size: 16pt">Add Flight</span></strong></td>
        </tr>
                    
                    <tr>
                        <td style="HEIGHT: 26px; width: 149px;">
                            AirPlaneName</td>
                                        <td style="HEIGHT: 26px">
&nbsp;<asp:DropDownList ID="DropDownList1" runat="server" 
        DataSourceID="SqlDataSource2" DataTextField="Plane_Name" 
        DataValueField="AirPlaneID" AutoPostBack="True" onselectedindexchanged="DropDownList1_SelectedIndexChanged">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:sqlString %>" 
        
                                                SelectCommand="SELECT AirPlaneID, [Plane Name] AS Plane_Name, [Total Bussiness Class Seats], [Total First Class Seats], [Total Club Class Seats] FROM Airline_Airplane">
</asp:SqlDataSource>
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="HEIGHT: 26px; width: 149px;">
                                            &nbsp;</td>
                                        <td style="HEIGHT: 26px">
                                            &nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td style="HEIGHT: 26px; width: 149px;">
                                            Schedule</td>
                        <td style="HEIGHT: 26px">
                            <asp:DropDownList ID="DropDownList2" runat="server" 
        DataSourceID="SqlDataSource3" DataTextField="scheduleName" 
        DataValueField="SchedueID" AutoPostBack="True">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:sqlString %>" 
        
                                
                                
                                SelectCommand="SELECT Airline_Schedule.SchedueID, '  [From] ' + CAST(Airline_Cities_1.[City Name] AS varchar(50)) + '  [To] ' + CAST(Airline_Cities.[City Name] AS varchar(50)) + ' [At] ' + CAST(Airline_Schedule.DepartTime AS varchar(20)) + '  ' + CAST(Airline_Schedule.DayofWeek AS varchar(50)) AS scheduleName, Airline_Schedule.DepartTime, Airline_Schedule.DayofWeek FROM Airline_Schedule INNER JOIN Airline_Route ON Airline_Schedule.RouteID = Airline_Route.RouteID INNER JOIN Airline_Cities ON Airline_Route.DestinationCityID = Airline_Cities.CityID INNER JOIN Airline_Cities AS Airline_Cities_1 ON Airline_Route.OriginalCityID = Airline_Cities_1.CityID ORDER BY Airline_Cities_1.CityID, Airline_Cities.CityID">
</asp:SqlDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 26px; width: 149px;">
                            &nbsp;</td>
                        <td style="HEIGHT: 26px">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 26px; width: 149px;">
                            Depart Date</td>
                        <td style="HEIGHT: 26px">
                            <asp:Calendar ID="Calendar1" runat="server" BackColor="#FFFFCC" 
                                BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" 
                                Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" 
                                ShowGridLines="True" Width="220px" ondayrender="Calendar1_DayRender">
                                <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
                                <SelectorStyle BackColor="#FFCC66" />
                                <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
                                <OtherMonthDayStyle ForeColor="#CC9966" />
                                <NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
                                <DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
                                <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" 
                                    ForeColor="#FFFFCC" />
                            </asp:Calendar>
                            <br />
                            <asp:CustomValidator ID="CustomValidator1" runat="server" 
                                ErrorMessage="CustomValidator" 
                                onservervalidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 26px; width: 149px;">
                            &nbsp;</td>
                        <td style="HEIGHT: 26px">
                            &nbsp;</td>
                    </tr>
                    
                    <tr>

                        <td style="HEIGHT: 26px; width: 149px;">
                            Avali Bussiness</td>
                        <td style="HEIGHT: 26px">
                            <asp:Label ID="Label2" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 26px; width: 149px;">
                            &nbsp;</td>
                        <td style="HEIGHT: 26px">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 26px; width: 149px;">
                            Avail First Seat</td>
                        <td style="HEIGHT: 26px">
                            <asp:Label ID="Label3" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td style="height: 29px; width: 149px">
                        </td>
                        <td style="height: 29px">
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 25px; width: 149px">
                            Avail Club Seat</td>
                        <td style="height: 25px">
                            <asp:Label ID="Label4" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td style="height: 23px; width: 149px">
                        </td>
                        <td style="height: 23px">
                        </td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 21px; width: 149px;">
                            Flight Status</td>
                        <td style="HEIGHT: 21px">
                            <asp:TextBox ID="txtFlightStatus" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtFlightStatus"
                                ErrorMessage="Flight Status Erorr" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 21px; width: 149px;">
                            &nbsp;</td>
                        <td style="HEIGHT: 21px">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 21px; width: 149px;">
                            isAllowSmoking</td>
                        <td style="HEIGHT: 21px">
                            <asp:CheckBox ID="cbxSmoking" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td style="HEIGHT: 21px; width: 149px;">
                            &nbsp;</td>
                        <td style="HEIGHT: 21px">
                            <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Add" />
                            <asp:Label ID="Label1" runat="server"></asp:Label>
                            <asp:Button ID="Button2" runat="server" CausesValidation="False" PostBackUrl="~/Admin/GetFlightList.aspx"
                                Text="Cancel" /></td>
                    </tr>
                </table>
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>

